home *** CD-ROM | disk | FTP | other *** search
- title Dialog Example
- option scale,96
- DIALOG CREATE,Dialog test,-1,0,300,308,SAVEPOS,CLASS TTestDlg
- DIALOG ADD,STYLE,Hyper,,,C,,LTBLUE
- DIALOG ADD,STYLE,BigText,Arial,12,B
- DIALOG ADD,STYLE,Bold,MS Sans Serif,8,B
- DIALOG ADD,MENU,File,Exit
- DIALOG ADD,MENU,Help,About Dlgtest
- DIALOG ADD,BITBTN,New,3,4,24,24,dlgtest.dsr|0
- DIALOG ADD,BITBTN,Open,3,30,24,24,dlgtest.dsr|247
- DIALOG ADD,GROUP,GROUP1,0,0,304,2
- DIALOG ADD,Text,Txt,36,10,,,Enter a filename:,BigText
- DIALOG ADD,Edit,edt,56,10,,,c:\autoexec.bat
- DIALOG ADD,list,lst,82,10,,80,click
- DIALOG ADD,COMBO,Combo,170,10,,,This is a combo control,CLICK,EXIT
- DIALOG ADD,RADIO,rg,38,208,80,124,Radio &Group,Button 1|Button 2|Button 3|Button 4|Button 5,Button 1,click
- DIALOG ADD,check,chk,172,210,80,,Check box,,click,bold
- DIALOG ADD,BITMAP,bmp,192,216,68,70,dlgtest.dsr|795,hand,STRETCH
- DIALOG ADD,progress,prog,200,10,,,50
- DIALOG ADD,BUTTON,OK,256,10,64,24,&OK,default,Bold
- DIALOG ADD,BUTTON,Run,256,124,64,24,&Run,Bold
- DIALOG ADD,TEXT,Txt2,232,10,180,,Visit http://www.vds.sade.net/,HYPER,HAND
- DIALOG ADD,status,stat,Interact with the dialog controls
- DIALOG ADD,GROUP,GROUP2,28,0,304,2
- DIALOG SHOW
- rem adjust dialog height for status bar height
- rem in case a different tooltip font is specified in Windows settings
- DIALOG SETPOS,,,,,@sum(288,@dlgpos(stat,H))
- LIST loadfile,lst,dlgtest.dsr|494
- LIST loadtext,COMBO
- "This is the combo list line 1
- "This is the combo list line 2
- "This is the combo list line 3
- %P = @sendmsg(~lst,1045,1000,0)
- :evloop
- wait 0.1,event
- %E = @event()
- goto %E
- :TIMER
- %P = @succ(%P)
- dialog set,prog,%P
- goto evloop
- :ExitMENU
- :OKButton
- exit
- :RunBUTTON
- shell open,@windir()\notepad.exe,c:\autoexec.bat,,wait
- goto evloop
- :HELP
- info You pressed F1 for help
- goto evloop
- :About DlgtestMENU
- info Dlgtest 3.0@cr()@cr()A Visual DialogScript demonstration@cr()application.@cr()@cr()Written by Julian Moss.@cr()@cr()Visual DialogScript @sysinfo(dsver)@cr()@cr()Copyright ⌐ 1995 - 1998 S.A.D.E. s.a.r.l.
- goto evloop
- :CLOSE
- if @ask(Are you sure you want to close?)
- exit
- end
- goto evloop
- :NewButton
- dialog clear,edt
- list clear,lst
- goto evloop
- :OpenBUTTON
- %F = @filedlg(*.*,,,multi)
- if @ok()
- dialog set,edt,%F
- list loadfile,lst,%F
- end
- goto evloop
- :comboEXIT
- list add,combo,@dlgtext(combo)
- goto evloop
- :CLICK
- if @equal(@click(B),RIGHT)
- dialog popup,Copy|Paste
- end
- goto evloop
- :lstCLICK
- dialog set,stat,List selection: @dlgtext(lst)
- goto evloop
- :rgCLICK
- dialog set,stat,Radio button selected: @dlgtext(rg)
- goto evloop
- :chkCLICK
- dialog set,stat,Check box state: @dlgtext(chk)
- goto evloop
- :comboCLICK
- dialog set,stat,Combo list selection: @dlgtext(combo)
- goto evloop
- :bmpCLICK
- dialog set,stat,Bitmap clicked at @click(x)", "@click(y)
- play sound.wav,wait
- goto evloop
- :copyMENU
- list copy,lst
- goto evloop
- :pasteMENU
- list paste,lst
- goto evloop
- :txt2CLICK
- shell open,@strdel(@dlgtext(txt2),1,6)
- goto evloop
-